/**
 * Created by chengming on 18/5/27.
 * version 1.0
 */
const BaseJsonAdapter = require('../base/BaseJsonAdapter');
const iconv = require("iconv-lite");
const vm = require('vm');
const request = require('request-promise');
const cheerio = require('cheerio');
const logger = require('../../conf/logger');
const querystring = require("querystring")
const urlencode = require("urlencode")

/**
 */
module.exports = class XinHuaNet extends BaseJsonAdapter{

    async reqJson(){
        const body = await this.doRequest();
        let decodeBody = iconv.decode(body, this.encoding).toString();
        decodeBody = decodeBody.replace('jQuery1124008466947843556993_1538012660686({','{')
        decodeBody = decodeBody.replace('}\n)','}')
        let data = JSON.parse(decodeBody)
        console.log('data',data.data.list)
        return data;
	}
}
